<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Visuals: GDK 3 Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
<link rel="home" href="index.html" title="GDK 3 Reference Manual">
<link rel="up" href="reference.html" title="API Reference">
<link rel="prev" href="gdk3-RGBA-Colors.html" title="RGBA Colors">
<link rel="next" href="gdk3-Cursors.html" title="Cursors">
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#gdk3-Visuals.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
                  <a href="#gdk3-Visuals.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="gdk3-RGBA-Colors.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="gdk3-Cursors.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="gdk3-Visuals"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="gdk3-Visuals.top_of_page"></a>Visuals</span></h2>
<p>Visuals — Low-level display hardware information</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="gdk3-Visuals.functions"></a><h2>Functions</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="functions_proto_type">
<col class="functions_proto_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-query-depths" title="gdk_query_depths ()">gdk_query_depths</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-query-visual-types" title="gdk_query_visual_types ()">gdk_query_visual_types</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">GList</span> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-list-visuals" title="gdk_list_visuals ()">gdk_list_visuals</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-bits-per-rgb" title="gdk_visual_get_bits_per_rgb ()">gdk_visual_get_bits_per_rgb</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-blue-pixel-details" title="gdk_visual_get_blue_pixel_details ()">gdk_visual_get_blue_pixel_details</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkByteOrder" title="enum GdkByteOrder"><span class="returnvalue">GdkByteOrder</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-byte-order" title="gdk_visual_get_byte_order ()">gdk_visual_get_byte_order</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-colormap-size" title="gdk_visual_get_colormap_size ()">gdk_visual_get_colormap_size</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-depth" title="gdk_visual_get_depth ()">gdk_visual_get_depth</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-green-pixel-details" title="gdk_visual_get_green_pixel_details ()">gdk_visual_get_green_pixel_details</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-red-pixel-details" title="gdk_visual_get_red_pixel_details ()">gdk_visual_get_red_pixel_details</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-visual-type" title="gdk_visual_get_visual_type ()">gdk_visual_get_visual_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">gint</span>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-depth" title="gdk_visual_get_best_depth ()">gdk_visual_get_best_depth</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-type" title="gdk_visual_get_best_type ()">gdk_visual_get_best_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-system" title="gdk_visual_get_system ()">gdk_visual_get_system</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best" title="gdk_visual_get_best ()">gdk_visual_get_best</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-with-depth" title="gdk_visual_get_best_with_depth ()">gdk_visual_get_best_with_depth</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-with-type" title="gdk_visual_get_best_with_type ()">gdk_visual_get_best_with_type</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-with-both" title="gdk_visual_get_best_with_both ()">gdk_visual_get_best_with_both</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *
</td>
<td class="function_name">
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-screen" title="gdk_visual_get_screen ()">gdk_visual_get_screen</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<a name="GdkVisual"></a><div class="refsect1">
<a name="gdk3-Visuals.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="other_proto_type">
<col class="other_proto_name">
</colgroup>
<tbody>
<tr>
<td class="datatype_keyword"> </td>
<td class="function_name"><a class="link" href="gdk3-Visuals.html#GdkVisual-struct" title="GdkVisual">GdkVisual</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType">GdkVisualType</a></td>
</tr>
<tr>
<td class="datatype_keyword">enum</td>
<td class="function_name"><a class="link" href="gdk3-Visuals.html#GdkByteOrder" title="enum GdkByteOrder">GdkByteOrder</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="gdk3-Visuals.object-hierarchy"></a><h2>Object Hierarchy</h2>
<pre class="screen">    GObject
    <span class="lineart">╰──</span> GdkVisual
</pre>
</div>
<div class="refsect1">
<a name="gdk3-Visuals.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;gdk/gdk.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="gdk3-Visuals.description"></a><h2>Description</h2>
<p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> describes a particular video hardware display format.
It includes information about the number of bits used for each color,
the way the bits are translated into an RGB value for display, and
the way the bits are stored in memory. For example, a piece of display
hardware might support 24-bit color, 16-bit color, or 8-bit color;
meaning 24/16/8-bit pixel sizes. For a given pixel size, pixels can
be in different formats; for example the “red” element of an RGB pixel
may be in the top 8 bits of the pixel, or may be in the lower 4 bits.</p>
<p>There are several standard visuals. The visual returned by
<a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> is the system’s default visual, and
the visual returned by <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a> should be used for
creating windows with an alpha channel.</p>
<p>A number of functions are provided for determining the “best” available
visual. For the purposes of making this determination, higher bit depths
are considered better, and for visuals of the same bit depth,
<a class="link" href="gdk3-Visuals.html#GDK-VISUAL-PSEUDO-COLOR:CAPS"><code class="literal">GDK_VISUAL_PSEUDO_COLOR</code></a> is preferred at 8bpp, otherwise, the visual
types are ranked in the order of(highest to lowest)
<a class="link" href="gdk3-Visuals.html#GDK-VISUAL-DIRECT-COLOR:CAPS"><code class="literal">GDK_VISUAL_DIRECT_COLOR</code></a>, <a class="link" href="gdk3-Visuals.html#GDK-VISUAL-TRUE-COLOR:CAPS"><code class="literal">GDK_VISUAL_TRUE_COLOR</code></a>,
<a class="link" href="gdk3-Visuals.html#GDK-VISUAL-PSEUDO-COLOR:CAPS"><code class="literal">GDK_VISUAL_PSEUDO_COLOR</code></a>, <a class="link" href="gdk3-Visuals.html#GDK-VISUAL-STATIC-COLOR:CAPS"><code class="literal">GDK_VISUAL_STATIC_COLOR</code></a>,
<a class="link" href="gdk3-Visuals.html#GDK-VISUAL-GRAYSCALE:CAPS"><code class="literal">GDK_VISUAL_GRAYSCALE</code></a>, then <a class="link" href="gdk3-Visuals.html#GDK-VISUAL-STATIC-GRAY:CAPS"><code class="literal">GDK_VISUAL_STATIC_GRAY</code></a>.</p>
</div>
<div class="refsect1">
<a name="gdk3-Visuals.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="gdk-query-depths"></a><h3>gdk_query_depths ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_query_depths (<em class="parameter"><code><span class="type">gint</span> **depths</code></em>,
                  <em class="parameter"><code><span class="type">gint</span> *count</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_query_depths</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>This function returns the available bit depths for the default
screen. It’s equivalent to listing the visuals
(<a class="link" href="gdk3-Visuals.html#gdk-list-visuals" title="gdk_list_visuals ()"><code class="function">gdk_list_visuals()</code></a>) and then looking at the depth field in each
visual, removing duplicates.</p>
<p>The array returned by this function should not be freed.</p>
<div class="refsect3">
<a name="gdk-query-depths.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>depths</p></td>
<td class="parameter_description"><p>return
location for available depths. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>count</p></td>
<td class="parameter_description"><p>return location for number of available depths</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-query-visual-types"></a><h3>gdk_query_visual_types ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_query_visual_types (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> **visual_types</code></em>,
                        <em class="parameter"><code><span class="type">gint</span> *count</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_query_visual_types</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>This function returns the available visual types for the default
screen. It’s equivalent to listing the visuals
(<a class="link" href="gdk3-Visuals.html#gdk-list-visuals" title="gdk_list_visuals ()"><code class="function">gdk_list_visuals()</code></a>) and then looking at the type field in each
visual, removing duplicates.</p>
<p>The array returned by this function should not be freed.</p>
<div class="refsect3">
<a name="gdk-query-visual-types.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>visual_types</p></td>
<td class="parameter_description"><p>return
location for the available visual types. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="Parameter points to an array of items."><span class="acronym">array</span></acronym> length=count][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>count</p></td>
<td class="parameter_description"><p>return location for the number of available visual types</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-list-visuals"></a><h3>gdk_list_visuals ()</h3>
<pre class="programlisting"><span class="returnvalue">GList</span> *
gdk_list_visuals (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_list_visuals</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Use gdk_screen_list_visuals (<a class="link" href="GdkScreen.html#gdk-screen-get-default" title="gdk_screen_get_default ()"><code class="function">gdk_screen_get_default()</code></a>).</p>
</div>
<p>Lists the available visuals for the default screen.
(See <a class="link" href="GdkScreen.html#gdk-screen-list-visuals" title="gdk_screen_list_visuals ()"><code class="function">gdk_screen_list_visuals()</code></a>)
A visual describes a hardware image data format.
For example, a visual might support 24-bit color, or 8-bit color,
and might expect pixels to be in a certain format.</p>
<p>Call <code class="function">g_list_free()</code> on the return value when you’re finished with it.</p>
<div class="refsect3">
<a name="gdk-list-visuals.returns"></a><h4>Returns</h4>
<p>a list of visuals; the list must be freed, but not its contents. </p>
<p><span class="annotation">[<acronym title="The caller owns the data container, but not the data inside it."><span class="acronym">transfer container</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> GdkVisual]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-bits-per-rgb"></a><h3>gdk_visual_get_bits_per_rgb ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_visual_get_bits_per_rgb (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_bits_per_rgb</code> has been deprecated since version 3.22. and should not be used in newly-written code.</p>
<p>Use <a class="link" href="gdk3-Visuals.html#gdk-visual-get-red-pixel-details" title="gdk_visual_get_red_pixel_details ()"><code class="function">gdk_visual_get_red_pixel_details()</code></a> and its variants to
    learn about the pixel layout of TrueColor and DirectColor visuals</p>
</div>
<p>Returns the number of significant bits per red, green and blue value.</p>
<p>Not all GDK backend provide a meaningful value for this function.</p>
<div class="refsect3">
<a name="gdk-visual-get-bits-per-rgb.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-bits-per-rgb.returns"></a><h4>Returns</h4>
<p> The number of significant bits per color value for <em class="parameter"><code>visual</code></em>
.</p>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-blue-pixel-details"></a><h3>gdk_visual_get_blue_pixel_details ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_visual_get_blue_pixel_details (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
                                   <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
                                   <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
                                   <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);</pre>
<p>Obtains values that are needed to calculate blue pixel values in TrueColor
and DirectColor. The “mask” is the significant bits within the pixel.
The “shift” is the number of bits left we must shift a primary for it
to be in position (according to the "mask"). Finally, "precision" refers
to how much precision the pixel value contains for a particular primary.</p>
<div class="refsect3">
<a name="gdk-visual-get-blue-pixel-details.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">guint32</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>shift</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">gint</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>precision</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">gint</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-byte-order"></a><h3>gdk_visual_get_byte_order ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkByteOrder" title="enum GdkByteOrder"><span class="returnvalue">GdkByteOrder</span></a>
gdk_visual_get_byte_order (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_byte_order</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>This information is not useful</p>
</div>
<p>Returns the byte order of this visual.</p>
<p>The information returned by this function is only relevant
when working with XImages, and not all backends return
meaningful information for this.</p>
<div class="refsect3">
<a name="gdk-visual-get-byte-order.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-byte-order.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="gdk3-Visuals.html#GdkByteOrder" title="enum GdkByteOrder"><span class="type">GdkByteOrder</span></a> stating the byte order of <em class="parameter"><code>visual</code></em>
.</p>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-colormap-size"></a><h3>gdk_visual_get_colormap_size ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_visual_get_colormap_size (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_colormap_size</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>This information is not useful, since GDK does not
    provide APIs to operate on colormaps.</p>
</div>
<p>Returns the size of a colormap for this visual.</p>
<p>You have to use platform-specific APIs to manipulate colormaps.</p>
<div class="refsect3">
<a name="gdk-visual-get-colormap-size.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-colormap-size.returns"></a><h4>Returns</h4>
<p> The size of a colormap that is suitable for <em class="parameter"><code>visual</code></em>
.</p>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-depth"></a><h3>gdk_visual_get_depth ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_visual_get_depth (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
<p>Returns the bit depth of this visual.</p>
<div class="refsect3">
<a name="gdk-visual-get-depth.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-depth.returns"></a><h4>Returns</h4>
<p> The bit depth of this visual.</p>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-green-pixel-details"></a><h3>gdk_visual_get_green_pixel_details ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_visual_get_green_pixel_details (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
                                    <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
                                    <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
                                    <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);</pre>
<p>Obtains values that are needed to calculate green pixel values in TrueColor
and DirectColor. The “mask” is the significant bits within the pixel.
The “shift” is the number of bits left we must shift a primary for it
to be in position (according to the "mask"). Finally, "precision" refers
to how much precision the pixel value contains for a particular primary.</p>
<div class="refsect3">
<a name="gdk-visual-get-green-pixel-details.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">guint32</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>shift</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">gint</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>precision</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">gint</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-red-pixel-details"></a><h3>gdk_visual_get_red_pixel_details ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
gdk_visual_get_red_pixel_details (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>,
                                  <em class="parameter"><code><span class="type">guint32</span> *mask</code></em>,
                                  <em class="parameter"><code><span class="type">gint</span> *shift</code></em>,
                                  <em class="parameter"><code><span class="type">gint</span> *precision</code></em>);</pre>
<p>Obtains values that are needed to calculate red pixel values in TrueColor
and DirectColor. The “mask” is the significant bits within the pixel.
The “shift” is the number of bits left we must shift a primary for it
to be in position (according to the "mask"). Finally, "precision" refers
to how much precision the pixel value contains for a particular primary.</p>
<div class="refsect3">
<a name="gdk-visual-get-red-pixel-details.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>mask</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">guint32</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>shift</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">gint</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>precision</p></td>
<td class="parameter_description"><p>A pointer to a <span class="type">gint</span> to be filled in, or <code class="literal">NULL</code>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-visual-type"></a><h3>gdk_visual_get_visual_type ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>
gdk_visual_get_visual_type (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
<p>Returns the type of visual this is (PseudoColor, TrueColor, etc).</p>
<div class="refsect3">
<a name="gdk-visual-get-visual-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-visual-type.returns"></a><h4>Returns</h4>
<p> A <a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> stating the type of <em class="parameter"><code>visual</code></em>
.</p>
</div>
<p class="since">Since: 2.22</p>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-best-depth"></a><h3>gdk_visual_get_best_depth ()</h3>
<pre class="programlisting"><span class="returnvalue">gint</span>
gdk_visual_get_best_depth (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_best_depth</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>Get the best available depth for the default GDK screen.  “Best”
means “largest,” i.e. 32 preferred over 24 preferred over 8 bits
per pixel.</p>
<div class="refsect3">
<a name="gdk-visual-get-best-depth.returns"></a><h4>Returns</h4>
<p> best available depth</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-best-type"></a><h3>gdk_visual_get_best_type ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="returnvalue">GdkVisualType</span></a>
gdk_visual_get_best_type (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_best_type</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>Return the best available visual type for the default GDK screen.</p>
<div class="refsect3">
<a name="gdk-visual-get-best-type.returns"></a><h4>Returns</h4>
<p> best visual type</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-system"></a><h3>gdk_visual_get_system ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
gdk_visual_get_system (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_system</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Use gdk_screen_get_system_visual (<a class="link" href="GdkScreen.html#gdk-screen-get-default" title="gdk_screen_get_default ()"><code class="function">gdk_screen_get_default()</code></a>).</p>
</div>
<p>Get the system’s default visual for the default GDK screen.
This is the visual for the root window of the display.
The return value should not be freed.</p>
<div class="refsect3">
<a name="gdk-visual-get-system.returns"></a><h4>Returns</h4>
<p>system visual. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-best"></a><h3>gdk_visual_get_best ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
gdk_visual_get_best (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_best</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>Get the visual with the most available colors for the default
GDK screen. The return value should not be freed.</p>
<div class="refsect3">
<a name="gdk-visual-get-best.returns"></a><h4>Returns</h4>
<p>best visual. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-best-with-depth"></a><h3>gdk_visual_get_best_with_depth ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
gdk_visual_get_best_with_depth (<em class="parameter"><code><span class="type">gint</span> depth</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_best_with_depth</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>Get the best visual with depth <em class="parameter"><code>depth</code></em>
 for the default GDK screen.
Color visuals and visuals with mutable colormaps are preferred
over grayscale or fixed-colormap visuals. The return value should
not be freed. <code class="literal">NULL</code> may be returned if no visual supports <em class="parameter"><code>depth</code></em>
.</p>
<div class="refsect3">
<a name="gdk-visual-get-best-with-depth.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>depth</p></td>
<td class="parameter_description"><p>a bit depth</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-best-with-depth.returns"></a><h4>Returns</h4>
<p>best visual for the given depth. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-best-with-type"></a><h3>gdk_visual_get_best_with_type ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
gdk_visual_get_best_with_type (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> visual_type</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_best_with_type</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>Get the best visual of the given <em class="parameter"><code>visual_type</code></em>
 for the default GDK screen.
Visuals with higher color depths are considered better. The return value
should not be freed. <code class="literal">NULL</code> may be returned if no visual has type
<em class="parameter"><code>visual_type</code></em>
.</p>
<div class="refsect3">
<a name="gdk-visual-get-best-with-type.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual_type</p></td>
<td class="parameter_description"><p>a visual type</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-best-with-type.returns"></a><h4>Returns</h4>
<p>best visual of the given type. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-best-with-both"></a><h3>gdk_visual_get_best_with_both ()</h3>
<pre class="programlisting"><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="returnvalue">GdkVisual</span></a> *
gdk_visual_get_best_with_both (<em class="parameter"><code><span class="type">gint</span> depth</code></em>,
                               <em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisualType" title="enum GdkVisualType"><span class="type">GdkVisualType</span></a> visual_type</code></em>);</pre>
<div class="warning">
<p><code class="literal">gdk_visual_get_best_with_both</code> has been deprecated since version 3.22 and should not be used in newly-written code.</p>
<p>Visual selection should be done using
    <a class="link" href="GdkScreen.html#gdk-screen-get-system-visual" title="gdk_screen_get_system_visual ()"><code class="function">gdk_screen_get_system_visual()</code></a> and <a class="link" href="GdkScreen.html#gdk-screen-get-rgba-visual" title="gdk_screen_get_rgba_visual ()"><code class="function">gdk_screen_get_rgba_visual()</code></a></p>
</div>
<p>Combines <a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-with-depth" title="gdk_visual_get_best_with_depth ()"><code class="function">gdk_visual_get_best_with_depth()</code></a> and
<a class="link" href="gdk3-Visuals.html#gdk-visual-get-best-with-type" title="gdk_visual_get_best_with_type ()"><code class="function">gdk_visual_get_best_with_type()</code></a>.</p>
<div class="refsect3">
<a name="gdk-visual-get-best-with-both.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>depth</p></td>
<td class="parameter_description"><p>a bit depth</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>visual_type</p></td>
<td class="parameter_description"><p>a visual type</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-best-with-both.returns"></a><h4>Returns</h4>
<p>best visual with both <em class="parameter"><code>depth</code></em>
and <em class="parameter"><code>visual_type</code></em>
, or <code class="literal">NULL</code> if none. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="gdk-visual-get-screen"></a><h3>gdk_visual_get_screen ()</h3>
<pre class="programlisting"><a class="link" href="GdkScreen.html" title="GdkScreen"><span class="returnvalue">GdkScreen</span></a> *
gdk_visual_get_screen (<em class="parameter"><code><a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> *visual</code></em>);</pre>
<p>Gets the screen to which this visual belongs</p>
<div class="refsect3">
<a name="gdk-visual-get-screen.parameters"></a><h4>Parameters</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>visual</p></td>
<td class="parameter_description"><p>a <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="gdk-visual-get-screen.returns"></a><h4>Returns</h4>
<p>the screen to which this visual belongs. </p>
<p><span class="annotation">[<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.2</p>
</div>
</div>
<div class="refsect1">
<a name="gdk3-Visuals.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="GdkVisual-struct"></a><h3>GdkVisual</h3>
<pre class="programlisting">typedef struct _GdkVisual GdkVisual;</pre>
<p>A <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> contains information about
a particular visual.</p>
</div>
<hr>
<div class="refsect2">
<a name="GdkVisualType"></a><h3>enum GdkVisualType</h3>
<p>A set of values that describe the manner in which the pixel values
for a visual are converted into RGB values for display.</p>
<div class="refsect3">
<a name="GdkVisualType.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-VISUAL-STATIC-GRAY:CAPS"></a>GDK_VISUAL_STATIC_GRAY</p></td>
<td class="enum_member_description">
<p>Each pixel value indexes a grayscale value
directly.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-VISUAL-GRAYSCALE:CAPS"></a>GDK_VISUAL_GRAYSCALE</p></td>
<td class="enum_member_description">
<p>Each pixel is an index into a color map that
maps pixel values into grayscale values. The color map can be
changed by an application.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-VISUAL-STATIC-COLOR:CAPS"></a>GDK_VISUAL_STATIC_COLOR</p></td>
<td class="enum_member_description">
<p>Each pixel value is an index into a predefined,
unmodifiable color map that maps pixel values into RGB values.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-VISUAL-PSEUDO-COLOR:CAPS"></a>GDK_VISUAL_PSEUDO_COLOR</p></td>
<td class="enum_member_description">
<p>Each pixel is an index into a color map that
maps pixel values into rgb values. The color map can be changed by
an application.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-VISUAL-TRUE-COLOR:CAPS"></a>GDK_VISUAL_TRUE_COLOR</p></td>
<td class="enum_member_description">
<p>Each pixel value directly contains red, green,
and blue components. Use <a class="link" href="gdk3-Visuals.html#gdk-visual-get-red-pixel-details" title="gdk_visual_get_red_pixel_details ()"><code class="function">gdk_visual_get_red_pixel_details()</code></a>, etc,
to obtain information about how the components are assembled into
a pixel value.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-VISUAL-DIRECT-COLOR:CAPS"></a>GDK_VISUAL_DIRECT_COLOR</p></td>
<td class="enum_member_description">
<p>Each pixel value contains red, green, and blue
components as for <a class="link" href="gdk3-Visuals.html#GDK-VISUAL-TRUE-COLOR:CAPS"><code class="literal">GDK_VISUAL_TRUE_COLOR</code></a>, but the components are
mapped via a color table into the final output table instead of
being converted directly.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="GdkByteOrder"></a><h3>enum GdkByteOrder</h3>
<p>A set of values describing the possible byte-orders
for storing pixel values in memory.</p>
<div class="refsect3">
<a name="GdkByteOrder.members"></a><h4>Members</h4>
<div class="informaltable"><table class="informaltable" width="100%" border="0">
<colgroup>
<col width="300px" class="enum_members_name">
<col class="enum_members_description">
<col width="200px" class="enum_members_annotations">
</colgroup>
<tbody>
<tr>
<td class="enum_member_name"><p><a name="GDK-LSB-FIRST:CAPS"></a>GDK_LSB_FIRST</p></td>
<td class="enum_member_description">
<p>The values are stored with the least-significant byte
first. For instance, the 32-bit value 0xffeecc would be stored
in memory as 0xcc, 0xee, 0xff, 0x00.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
<tr>
<td class="enum_member_name"><p><a name="GDK-MSB-FIRST:CAPS"></a>GDK_MSB_FIRST</p></td>
<td class="enum_member_description">
<p>The values are stored with the most-significant byte
first. For instance, the 32-bit value 0xffeecc would be stored
in memory as 0x00, 0xff, 0xee, 0xcc.</p>
</td>
<td class="enum_member_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
</div>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.33.1</div>
</body>
</html>